#include "KeyLaunch.h"
#include "KeyMonitor.h"
#include "KeyCapturer.h"
#include <QDebug>

static CDD dd;

KeyLaunch::KeyLaunch()
{
//    const wchar_t *dll_name = L"DD94687.32.dll"; // 发布时，使用此dll
    const wchar_t *dll_name = L"DD32.dll";
    int ret = dd.GetFunAddr(dll_name);
    qInfo("GetFunAddr ret = %d", ret);
}

KeyLaunch::~KeyLaunch()
{
}

int keyDownUp(int key)
{
    int ddcode = dd.DD_todc(key);
    dd.DD_key(ddcode, 1);
    dd.DD_key(ddcode, 2);
    return 0;
}

int keyUp(int key)
{
    int ddcode = dd.DD_todc(key);
    dd.DD_key(ddcode, 2);
    return 0;
}